<!doctype html>
<html lang="en"> 
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, user-scalable=no"/>
<title>斗地主</title>
<script type="text/javascript" src="{{static_url('js/phaser.min.js')}}"></script>
<script type="text/javascript" src="{{static_url('js/phaser-input.min.js')}}"></script>
<style type="text/css">body{padding:0; margin:0;background-color: black;} #game{ margin:auto;}</style>
</head>
<body>
<div id="game"></div>
<div id="orientation"></div>
<input id="user" type="hidden">
<script type="module">
import {Boot, Preloader, Login, MainMenu} from '/static/js/boot.mjs'
import {Game} from '/static/js/game.mjs'
(function () {
    let h = window.innerHeight * 960/window.innerWidth;
    if (h > 540) h = 540;
    const game = new Phaser.Game(960, h, Phaser.AUTO, 'game');
    game.state.add('Boot', Boot);
    game.state.add('Preloader', Preloader);
    game.state.add('Login', Login);
    game.state.add('MainMenu', MainMenu);
    game.state.add('Game', Game);
    game.state.start('Boot');
})();
</script>
</body>
</html>
